package com.comparator.comparator1;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Client {
public static void main(String[] args) {
	System.out.println("----SortByEmployeeId---");
	List list=new ArrayList();
	list.add(new Employee(103, "sonam", 45,2000));
	list.add(new Employee(101, "poonam", 37,34000));
	list.add(new Employee(102, "pankaj", 25,21000));
	list.add(new Employee(105, "amit", 22,67000));
	list.add(new Employee(105, "deepak", 15,90000));
	Collections.sort(list);
	for(Object obj:list){
		System.out.println(obj);
	}
	System.out.println("----SortByEmployeeAge---");
	
	Collections.sort(list, new SortByEmployeeAge());
	for(Object obj2:list){
		System.out.println(obj2);
	}
	System.out.println("----SortByEmployeeSalary---");

	Collections.sort(list, new SortByEmployeeSalary());
	for(Object obj3:list){
		System.out.println(obj3);
	}
}
}
